Repository navigation
Fix documentation errors in Android.Content (R099, pass 3) - #1979
Conversation
Correct AI-added text that pinned AOSP sources contradict: AttributionSource.Builder PID default, ContentProvider.OnLowMemory API 34 note, ContentValues GetAs* null returns, UpdateBindingParams.Flags nullability, UpdateableFlags list, ContextWrapper.CreateContextForSplit and WALLPAPER_SERVICE, FileCreationMode world-access target SDK qualifier. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for this documentation-only update.
No open issues 🎉
What changed in this PR
This documentation-only update corrects Android.Content API descriptions to better reflect Android platform behavior and .NET binding contracts. No runtime code changes are included.
Changes:
- Clarifies PID defaults, binding flags, split-context behavior, and the wallpaper service return type.
- Corrects seven
ContentValuesreturn descriptions to explain exceptions when Java returns null. - Documents API-level and target-SDK conditions for low-memory callbacks and world-accessible file modes.
| File | Description |
|---|---|
docs/xml/Android.Content/FileCreationMode.xml |
Clarifies target-SDK conditions for security exceptions. |
docs/xml/Android.Content/ContextWrapper.xml |
Corrects split-context behavior and wallpaper service type. |
docs/xml/Android.Content/Context+UpdateBindingParams.xml |
Documents null flags for unbind requests. |
docs/xml/Android.Content/Context.xml |
Removes an unsupported updateable binding flag. |
docs/xml/Android.Content/ContentValues.xml |
Clarifies non-nullable managed return behavior. |
docs/xml/Android.Content/ContentProvider.xml |
Notes that low-memory callbacks stop at API 34. |
docs/xml/Android.Content/AttributionSource+Builder.xml |
Distinguishes default PID behavior from copied-source behavior. |
Review effort: Balanced
StrictMode reports IncorrectContextUseViolation through VmPolicy penalties and does not throw it (StrictMode.java:2713-2715, 2900-2960). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The remarks also said the access throws a Violation. StrictMode reports it through VmPolicy penalties (StrictMode.java:2713-2715, 2900-2960). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
@dalexsoto review |
|
In response to @jonathanpeppers's request: My source checks are not finished for ContentValues.GetAs* null/exception behavior (managed return types and the pinned JNI boxed-value conversion), UpdateBindingParams.Flags nullability, and the platform-version claims in Context, ContextWrapper, ContentProvider, AttributionSource.Builder, and FileCreationMode. The remaining seven-file review is deferred to the next scheduled pass. This is a reviewer coverage gap, not a defect identified in the PR; no source-tool failure or blocking finding was established. |
dalexsoto
left a comment
There was a problem hiding this comment.
Reviewed the seven doc corrections at a155200 against the Android 17 platform source (frameworks/base android-17.0.0_r1 Context.java and the previously cited AOSP/dotnet/android sources); the corrections match the implementation. LGTM.

Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
a155200ff77ad9c626f79d805b5c693699236a92↑ gemini-4-argon rubber-duck review confirmed all 8 change groups; a second gemini-4-argon review confirmed the
IsUiContextfix and checked everyonIncorrectContextUsedcaller; a third confirmed the matching remarks fix.↑ All changed XML parses;
git diff --checkis clean; 20 lines changed, bytes and BOM kept.↓ Bindings follow platform r02; pinned archive is r01.
Scope
Pass-3 review item R099: 77 files in
docs/xml/Android.Content. I reviewed only text changed ingit diff 86f7744a1 origin/main. Ledger: 1536 channels (1342 correct, 12 fix rows here, 3 uncertain, 174 deferred boilerplate).Fixes
AttributionSource.Builder.SetPidsummary and remarksINVALID_PID.Builder(AttributionSource)copies the PID of the source.ContentProvider.OnLowMemoryremarksContentValues.GetAsBoolean/Byte/Double/Float/Integer/Long/Shortreturns (7)Context.UpdateBindingParams.FlagsvaluegetFlags()returns null for an unbind request.Context.UpdateableFlagsremarksBIND_ABOVE_CLIENT.BIND_UPDATEABLE_FLAGSdoes not include it.ContextWrapper.CreateContextForSplitsummaryContextWrapper.GetSystemServiceremarksWALLPAPER_SERVICEreturns aWallpaperService. The registry returnsWallpaperManager.FileCreationMode.WorldReadable/WorldWriteablesummaryContext.IsUiContextvalue and remarksUncertain findings (not changed)
AsyncTaskLoader.CancelLoad: Loader contract return text vs. AsyncTaskLoader behavior for a waiting task.ContextParams.Buildercopy ctor: pre-AI text says it inherits all sub-parameters; outside the AI-changed span.ContextWrapper.BindService:@returnsays false without permission;@throwssays SecurityException. The ActivityManager result mapping is not in pinned sources.Checks
git diff --checkis clean.index.xml,_filter.xml, orFrameworksIndex.transferparameter wording.